<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>{:C('SITE_NAME')}_商家中心</title>
<script type="text/javascript" src="__JS__/jquery.js"></script>
<script type="text/javascript" src="__JS__/jquery.validation.min.js"></script>
<link href="__CSS__/base.css" rel="stylesheet" type="text/css">
<link href="__CSS__/seller_center.css" rel="stylesheet" type="text/css">
<link href="__CSS__/font/css/font-awesome.min.css" rel="stylesheet" />
<!--[if IE 7]>
<link rel="stylesheet" href="<?php echo SHOP_RESOURCE_SITE_URL;?>/font/font-awesome/css/font-awesome-ie7.min.css">
<![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="__JS__/html5shiv.js"></script>
<script src="__JS__/respond.min.js"></script>
<![endif]-->
<!--[if IE 6]>
<script src="__JS__/IE6_MAXMIX.js"></script>
<script src="__JS__/IE6_PNG.js"></script>
<script>
DD_belatedPNG.fix('.pngFix');
</script>
<script> 
// <![CDATA[ 
if((window.navigator.appName.toUpperCase().indexOf("MICROSOFT")>=0)&&(document.execCommand)) 
try{ 
document.execCommand("BackgroundImageCache", false, true); 
   } 
catch(e){} 
// ]]> 
</script> 
<![endif]-->
<script type="text/javascript">
window.onload = function() {
    tips = new Array(2);
    tips[0] = document.getElementById("loginBG01");
    tips[1] = document.getElementById("loginBG02");
    index = Math.floor(Math.random() * tips.length);
    tips[index].style.display = "block";
};
$(document).ready(function() {
    $("#form_login").validate({
        errorPlacement:function(error, element) { 
			element.prev(".repuired").append(error);
        },
        rules:{
        	username:{
                required:true
            },
            password:{
                required:true
            },
            captcha:{
                required:true,
                remote:{
                    url:"{:U('store/login/check')}",
                    type:"post",
                    data:{
                        captcha:function() {
                            return $("#captcha").val();
                        }
                    }
                }
            }
        },
        messages:{
        	username:{
                required:"<i class='icon-exclamation-sign'></i>用户名不能为空"
            },
            password:{
                required:"<i class='icon-exclamation-sign'></i>密码不能为空"
            },
            captcha:{
                required:"<i class='icon-exclamation-sign'></i>验证码不能为空",
                remote:"<i class='icon-frown'></i>验证码错误"
            }
        }
    });
	//Hide Show verification code
    $("#hide").click(function(){
        $(".code").fadeOut("slow");
    });
    $("#captcha").focus(function(){
        $(".code").fadeIn("fast");
    });    
   
});
</script>
</head>
<body>
	<div id="loginBG01" class="ncsc-login-bg">
		<p class="pngFix"></p>
	</div>
	<div id="loginBG02" class="ncsc-login-bg">
		<p class="pngFix"></p>
	</div>
	<div class="ncsc-login-container">
		<div class="ncsc-login-title">
			<h2>商家管理中心</h2>
			<span>请输入分配的商户用户账号</br>登录密码为商户用户密码</span>
		</div>
		<form id="form_login" action="{:U('store/login/login')}" method="post">
			<div class="input">
				<label>用户名</label> 
				<span class="repuired"></span>
				<input name="username" type="text" autocomplete="on" class="text" autofocus>
				<span class="ico"><i class="icon-user"></i></span>
			</div>
			<div class="input">
				<label>密码</label> 
				<span class="repuired"></span>
				<input name="password" type="password" autocomplete="off" class="text">
				<span class="ico"><i class="icon-key"></i></span>
			</div>
			<div class="input">
				<label>验证码</label> 
				<span class="repuired"></span> 
				<input type="text" name="captcha" id="captcha" autocomplete="off" class="text" style="width: 80px;" maxlength="4" size="10" />
				<div class="code">
					<div class="arrow"></div>
					<div class="code-img">
						<a href="javascript:void(0)" onclick="javascript:document.getElementById('codeimage').src='/index.php?m=store&c=login&a=captcha&t=' + Math.random();">
						<img src="/index.php?m=store&c=login&a=captcha&t=' + Math.random();" name="codeimage" border="0" id="codeimage"></a>
					</div>
					<a href="JavaScript:void(0);" id="hide" class="close" title="关闭"><i></i></a>
					<a href="JavaScript:void(0);" onclick="javascript:document.getElementById('codeimage').src='/index.php?m=store&c=login&a=captcha&t=' + Math.random();" class="change" title="看不清,点击更换验证码"><i></i></a>
				</div>
				<span class="ico"><i class="icon-qrcode"></i></span><input type="submit" class="login-submit" value="商家登录">
			</div>
		</form>
		<div class="copyright">Powered by {:C('SITE_NAME')} © 2015-2016 <a href="{:C('SITE_URL')}" target="_blank">{:C('SITE_NAME')}</a>
		</div>
	</div>
</body>
</html>
